How to Copy Conditional Formatting to Another Workbook in Excel 您所在的位置:网站首页 vba copy to another workbook How to Copy Conditional Formatting to Another Workbook in Excel

How to Copy Conditional Formatting to Another Workbook in Excel

2023-08-31 07:25| 来源: 网络整理| 查看: 265

Get FREE Advanced Excel Exercises with Solutions!

Conditional Formatting is one of the most used Excel tools. Conditional Formatting allows us to format cells according to our criteria. In this article, we will see several ways to Excel Copy Conditional Formatting to Another Workbook. We have a sample dataset containing Name, Gender, Occupation, and Salary.

Copy Conditional Formatting

Table of Contents hide Download Practice Workbook 3 Ways to Copy Conditional Formatting to Another Workbook in Excel Method 1: Copy Conditional Formatting to Another Workbook Using Format Painter Method 2: Copy Conditional Formatting to Another Workbook by Paste Special Method 3: VBA to Copy Conditional Formatting to Another Workbook Things to Remember Conclusion Related Articles Download Practice Workbook Copy Conditional Formatting.xlsm 3 Ways to Copy Conditional Formatting to Another Workbook in Excel

In our sample data Gender and Salary columns are conditional formatted. Here, Females are highlighted and Salary above $30000 is highlighted. We will see how to copy this formatting to another workbook, where we have another dataset That looks like the following image.

We will see 3 easy methods to copy this Conditional Formatting in another workbook.

Method 1: Copy Conditional Formatting to Another Workbook Using Format Painter

Here, we will see the use of Format Painter.

Steps:

First, select the entire data set or the specific column or rows or cells where lies the formatting that you want to copy. Then, click the Format Painter.

Copy Conditional Formatting using format painter

After that, go to the Workbook where you want to apply this Conditional Formatting, and all you need to do is drag down to select a range. The formation will be copied.

Now, our dataset will look like the following image.

As you can see, the formatting is exactly what we wanted.

Read More: How to Copy Conditional Formatting to Another Sheet (2 Quick Methods)

Method 2: Copy Conditional Formatting to Another Workbook by Paste Special

In our second method, we will discuss Paste Special option to copy Conditional Formatting in Excel.

Steps:

First, select the specific range or cell where our conditional formatting lies. Then Press CTRL+C or copy using the right click of the mouse.

Copy Conditional Formatting paste special

Now, go to the worksheet or workbook where our new dataset is and select the entire range in the dataset, and right-click the mouse button.

Copy Conditional Formatting paste formats

Form here, click on Paste Special as shown in the above image and a dialogue box will pop up.

Just select Formats as shown in the above image and click OK.

All the cells are formatted accordingly.

Read More: How to Remove Conditional Formatting but Keep the Format in Excel

Similar Readings:

Pivot Table Conditional Formatting Based on Another Column (8 Easy Ways) Conditional Formatting with INDEX-MATCH in Excel (4 Easy Formulas) Excel Conditional Formatting on Multiple Columns How to Do Conditional Formatting Highlight Row Based On Date Excel Conditional Formatting for Dates within 30 Days (3 Examples) Method 3: VBA to Copy Conditional Formatting to Another Workbook

At the end of this article, we will see the use of VBA code to copy conditional formatting from one workbook to another. Keep in mind to open both the workbook while applying this method.

Steps:

First, right-click on the sheet and go to View Code.

Copy Conditional Formatting vba

After that, copy and paste the VBA code below.

VBA code:

Sub mycopycode() Workbooks("Copy Conditional Formatting").Worksheets("Sample Data").Activate Range("C5:C11", "E5:E11").Select Selection.Copy Workbooks("Book1").Worksheets("Sheet3").Activate Range("E4:E10", "G4:G10").Select Range("E4:E10", "G4:G10").PasteSpecial xlPasteFormats End Sub

Copy Conditional Formatting macros

After that, press the F5 or play button to run the code.

That’s it. Our VBA has copied the format to the new workbook.

Read More: VBA Conditional Formatting Based on Another Cell Value in Excel

Things to Remember

We have to keep a couple of things in mind while doing these methods.

We have to check the Formula in conditional Formatting, whether it is Relative reference or Absolute reference. In case of referencing you may need to change the formula according to your cell after applying Paste Special of Format Painter. Always keep open the workbooks while copying from one workbook to another. Conclusion

These are 3 different methods to Copy Conditional Formatting to Another Workbook in Excel. Based on your preferences, you may choose the best alternative. Please leave them in the comments area if you have any questions or feedback

Related Articles How to Apply Conditional Formatting to Multiple Rows (5 Ways) Do Conditional Formatting with Multiple Criteria (11 Ways) Conditional Formatting on Text that Contains Multiple Words in Excel Apply Conditional Formatting to Each Row Individually: 3 Tips Conditional Formatting Entire Column Based on Another Column(6 Steps) How to Find Highest Value in Excel Column (4 Methods) SaveSavedRemoved 0

Tags: Excel Conditional Formatting

Mahbubur Rahman Mahbubur Rahman class="mb10">

Mahbubur Rahman is a highly skilled and experienced professional with a strong background in both engineering and business administration. With an impressive technical skill set and a passion for innovation and problem-solving, Mahbubur has achieved great success in his field.

Related Articles Added to wishlistRemoved from wishlist 1 How to Do GST reconciliation in Excel How to Do GST Reconciliation in Excel (4 Suitable Methods) Added to wishlistRemoved from wishlist 1 create multiple invoices from excel spreadsheet How to Create Multiple Invoices from Excel Spreadsheet Added to wishlistRemoved from wishlist 1 How to Combine Two Formulas in Excel How to Combine Two Formulas in Excel (3 Ways) Added to wishlistRemoved from wishlist 1 Pearson's Coefficient of Skewness in Excel How to Calculate Pearson’s Coefficient of Skewness in Excel We will be happy to hear your thoughts Leave a reply Cancel reply


【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有